Skip to content

Diag tool pr1#8

Closed
leducp wants to merge 2 commits into
mainfrom
diag_tool_pr1
Closed

Diag tool pr1#8
leducp wants to merge 2 commits into
mainfrom
diag_tool_pr1

Conversation

@leducp
Copy link
Copy Markdown
Owner

@leducp leducp commented Apr 17, 2026

  • Cleanup and reorganize OS layer
  • Use yield instead of sleep(0) to force cooperative switch
  • Add a registry shm to record topics
  • Add per ring stats counter

Expose per-ring `dropped_count` / `lost_count` atomics in SubRingHeader
(placed inside existing write_pos cache-line padding — no sizeof change,
no new coherency traffic). Publisher bumps dropped_count on the self-
repair / drop path; Subscriber bumps lost_count at each loss site.

New SharedRegion::stats() returns a RegionStats snapshot: per-ring state,
in_flight, write_pos, dropped_count, lost_count plus aggregates
(total_writes, total_drops, total_losses, live_rings, approximate
pool_free). Safe under live traffic.

Python bindings expose RingStats, RegionStats, and SharedRegion.stats()
so external monitoring can read counters without a CLI.
@leducp leducp force-pushed the diag_tool_pr1 branch 3 times, most recently from 99f112c to 2365fcb Compare April 17, 2026 14:39
@trns1997
Copy link
Copy Markdown
Collaborator

Can we add examples?

@leducp
Copy link
Copy Markdown
Owner Author

leducp commented Apr 17, 2026

This just the first PR ;)

@leducp leducp requested a review from trns1997 April 20, 2026 07:24
@leducp
Copy link
Copy Markdown
Owner Author

leducp commented Apr 20, 2026

superseed by #9

@leducp leducp closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants